//
// Created by jinbang.li on 2023/4/6.
//

#ifndef OPENPLAYDEMO_OPFFDEMUX_H
#define OPENPLAYDEMO_OPFFDEMUX_H

#include "IOpDemux.h"
struct AVFormatContext;
class OpFFDemux: public IOpDemux{
public:
    virtual bool Open(const char *url);
    ///视频参数
    virtual OpParameter GetVideoParam();
    ///音频参数
    virtual OpParameter GetAudioParam();
    virtual OpData Read();
    OpFFDemux();

private:
    AVFormatContext *ic = 0;
    ///一般视频索引为0，音频为1
    int audioStream = 1;
    int videoStream = 0;
};


#endif //OPENPLAYDEMO_OPFFDEMUX_H
